<?php
/**
 * The template for displaying the footer.
 * @package WordPress
 * @subpackage MIP
 * @since MIP 1
 */
?>

	<!-- BEGIN FOOTER -->
		<div id="bottom_container">
			<div id="footer">
				<div id="foot">
				  <div id="footleft">

					
					<?php 
					$disablefootmenu= get_option('mip-base_footmenu') ;
					if($disablefootmenu!=true){
					?>
					<?php wp_nav_menu( array(
						  'container'       => 'ul', 
						  'depth'           => 1,
						  'sort_column' => 'menu_order',
						  'theme_location' => 'bottommenu' 
						  )); 
					?>
					<br />
					<?php }?>
					<div class="copyright">
					<?php $footertext = stripslashes(get_option('mip-base_footer'));?>
					<?php if($footertext==""){?>
					<?php _e('Copyright &copy;', 'mip-base');?><?php
					global $wpdb;
			$post_datetimes = $wpdb->get_results("SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM $wpdb->posts WHERE post_date_gmt > 1970");
			if ($post_datetimes) {
				$firstpost_year = $post_datetimes[0]->firstyear;
				$lastpost_year = $post_datetimes[0]->lastyear;

				$copyright = $firstpost_year;
				if($firstpost_year != $lastpost_year) {
					$copyright .= '-'. $lastpost_year;
				}
				$copyright .= ' ';

				echo $copyright;
				bloginfo('name');
			}
		?>.&nbsp;<?php _e('All rights reserved.<br />
		  Powered by <a href="http://wordpress.org">WordPress</a>   |  Theme by  <a href="http://www.moviesintheparkyourcity.com">MoviesInTheParkYourCity.com</a>', 'mip-base');?>

					<?php }else{?>
					<?php echo $footertext; ?>
					<?php } ?>
					</div>
					</div><!-- end of footleft -->
					<div id="footright">
					
					<?php 
					$disablebookmark = get_option('mip-base_socialbookmark');
					$rssurl = get_option('mip-base_rss');
					if($rssurl == ""){ $rssurl = get_bloginfo('url') . "/?feed=rss2"; }
					$twitname = get_option('mip-base_twitter');
					if($twitname == ""){ $twitname = "mip-base"; }
					?>

					<?php if($disablebookmark!=true){ ?>
						<div id="bookmark">
						<h3>Bookmark it!!</h3>
						<ul>
							<li><a href="<?php echo $rssurl;?>"><img src="<?php bloginfo('template_url'); ?>/images/icon1.gif" alt="rss" /></a></li>
							<li><a href="http://twitter.com/<?php echo $twitname;?>" ><img src="<?php bloginfo('template_url'); ?>/images/icon2.gif" alt="twitter" /></a></li>
							<li><a href="http://www.facebook.com/share.php?u=<?php the_permalink();?>"><img src="<?php bloginfo('template_url'); ?>/images/icon3.gif" alt="facebook" /></a></li>
							<li><a href="http://www.stumbleupon.com/submit?url=<?php the_permalink();?>&amp;title=<?php the_title();?>"><img src="<?php bloginfo('template_url'); ?>/images/icon5.gif" alt="stumbleupon" /></a></li>
							<li><a href="http://digg.com/submit?phase=2&amp;url=<?php the_permalink();?>&amp;title=<?php the_title();?>"><img src="<?php bloginfo('template_url'); ?>/images/icon6.gif" alt="digg" /></a></li>
							<li><a href="http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=<?php the_permalink();?>&amp;title=<?php the_title();?>"><img src="<?php bloginfo('template_url'); ?>/images/icon7.gif" alt="delicious" /></a></li>
						</ul>
						</div>
						<?php } ?>
					</div><!-- end of footright -->
				</div>
			</div><!-- end of footer -->
		</div><!-- end of bottom container -->
	<!-- END OF FOOTER -->

		<?php wp_footer(); ?>
<?php $google = stripslashes(get_option('mip-base_google'));?>
<?php if($google==""){?>
<?php }else{?>
<?php echo $google; ?>
<?php } ?>
</body>
</html>
